Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: update docs/windows.rst #3825

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

leleliu008
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (dedfed1) 85.02% compared to head (b89c1da) 85.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3825   +/-   ##
=======================================
  Coverage   85.02%   85.02%           
=======================================
  Files         228      228           
  Lines       53874    53874           
=======================================
  Hits        45807    45807           
  Misses       8067     8067           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/windows.rst Outdated Show resolved Hide resolved
docs/windows.rst Outdated Show resolved Hide resolved

**General**
This supports only Microsoft Visual Studio 2013.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tried with Microsoft Visual Studio Express 2017 and it seems that the project files for 2013 still works. (I haven't tried with 2019 or 2022 yet.)

I had to copy some files before running the msbuild command.

copy win32\config_mvc.h config.h
copy win32\gnulib_h\langinfo.h gnulib
copy win32\gnulib_h\fnmatch.h gnulib

Copy link
Member Author

@leleliu008 leleliu008 Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using VS2019 reported following:

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(439,5): error MSB8020: The build too 
ls for Visual Studio 2013 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install Visual Studio 2013 build tools. 
  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarge 
t solution". [C:\Users\vagrant\ctags\win32\ctags_vs2013.vcxproj]

I think the file name ctags_vs2013.* should rename to other name if it really supports VS2015 and VS2017.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this PC has both VS2013 and VS2017 installed. So, even VS2017's msbuild is used, toolset from VS2013 is used.

If <PlatformToolset>v120</PlatformToolset> lines in the .vcxproj file are changed to <PlatformToolset>v141</PlatformToolset>, it might work on the newer VS versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, currently, it is v120, we don't need to mention about other versions of VS now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per https://learn.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset?view=msvc-170#platform-toolset

Visual Studio 2010: v100
Visual Studio 2013: v120
Visual Studio 2015: v140
Visual Studio 2017: v141
Visual Studio 2019: v142
Visual Studio 2022: v143

PlatformToolset can't be changed via msbuild options.

It seems that we need ctags_vs2013.vcxproj ctags_vs2015.vcxproj ctags_vs2017.vcxproj ctags_vs2019.vcxproj ctags_vs2022.vcxproj.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is a way to support multiple versions of VS in one vcxporj file:
https://qiita.com/yumetodo/items/a8324efaf83c9c08d168 (Japanese)
The basic idea is to switch PlatformToolset based on VisualStudioVersion.
(This page suggests using CMake instead of this method, though.)

Copy link
Member Author

@leleliu008 leleliu008 Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should use cmake instead of msbuild, we do not need to maintain nmake and msbuild build script, cmake build script is much easier than msbuild build script. moden Vistual Studio already includes the cmake as well.

@masatake masatake merged commit 0aa6d04 into universal-ctags:master Sep 28, 2023
40 checks passed
@masatake
Copy link
Member

@leleliu008 Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants